#ifndef __MEM_CTRL_H__
#define __MEM_CTRL_H__

#include "stdint.h"

//#define MAX_UP_LINE 50000


typedef struct 
{
    uint32_t    *data_ptr;
    uint16_t    data_len;   
    uint16_t    __max_data_len;
}mem_control;


typedef struct 
{
    uint8_t peak_valid;
    uint16_t peak_loc;
} Peak_OrNo;

// private func
// do not use
void move_uint32(uint32_t *data_list,uint16_t move_n,uint16_t _length);
void move_int32 ( int32_t *data_list,uint16_t move_n,uint16_t _length);

/*******************************************************************/

// public inter
// use
uint8_t init_list(uint32_t *data_block, uint16_t data_size,mem_control *_list);
uint8_t append_data(uint32_t one_data , mem_control *tar_list);
uint8_t pop_left(mem_control *tar_list);
uint8_t clear_list(mem_control *tar_list);
uint16_t get_list_len(mem_control *tar_obj);
uint8_t list_isFull(mem_control *tar_obj);
Peak_OrNo find_max( uint32_t *_src , const uint16_t src_len);
int32_t mean_fun(int32_t *src_list,const uint16_t len);
void Reverse_pos_neg(uint32_t *_ser_src , const uint16_t _src_len);


#endif



